package com.irdstudio.bhcredit.ssm.framework.utils;

import java.util.Collection;

public class CheckObjIsNullUtil {
	/**
	 * 判断对象(值及引用)是否不为空
	 * @param pattern
	 * @return	为空false 非空true
	 * @author panpd
	 */
	public static boolean isNotNull(Object pattern){
		if(null==pattern || "".equals(pattern) || (pattern instanceof Collection && ((Collection<?>)pattern).size()==0)){
			return false;
		} else {
			return true;
		}
		
	}
	
	/**
	 * 是否为空
	 * @param pattern
	 * @return 为空true 非空false
	 */
	public static boolean isNull(Object pattern){
		return !isNotNull(pattern);
	}
}
